import 'package:shining_red_star/definitions/router.dart';

import 'icon_font.dart';

enum AppKind {
  system,
  learnApp,
}

enum AppId {
  pictorial,
  someThing,
  number,
  color,
  shape,
  practice,
  pinYin,
  schulteGrid,
  setting,
  smbBrowser,
  countDucks,
  arithmetic,
}

class AppInfo {
  final AppKind kind;
  final AppId id;
  final String name;
  final IconFontValue avatar;
  final RouterKey routerKey;
  final int? backgroundColor;

  const AppInfo(
      {required this.kind,
      required this.id,
      required this.name,
      required this.avatar,
      required this.routerKey,
      this.backgroundColor});
}

const AppInfo pictorial = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.pictorial,
    name: '精神传承',
    avatar: IconFontValue.goldenStar,
    routerKey: RouterKey.pictorial,
    backgroundColor: 0xffde2910);

const AppInfo someThing = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.someThing,
    name: '认识事物',
    avatar: IconFontValue.someThing,
    routerKey: RouterKey.someThing,
    backgroundColor: 0xffeb3e3e);

const AppInfo number = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.number,
    name: '认识数字',
    avatar: IconFontValue.number,
    routerKey: RouterKey.number,
    backgroundColor: 0xffc4f4cb);

const AppInfo color = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.color,
    name: '认识颜色',
    avatar: IconFontValue.color,
    routerKey: RouterKey.color,
    backgroundColor: 0xffffc2f0);

const AppInfo shape = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.shape,
    name: '认识形状',
    avatar: IconFontValue.shape,
    routerKey: RouterKey.shape,
    backgroundColor: 0xfffbf4ee);

const AppInfo practice = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.practice,
    name: '练习',
    avatar: IconFontValue.practice,
    routerKey: RouterKey.practice,
    backgroundColor: 0xffbae0ff);

const AppInfo pinYin = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.pinYin,
    name: '拼音',
    avatar: IconFontValue.pinYin,
    routerKey: RouterKey.pinYin,
    backgroundColor: 0xfffef0ff);

const AppInfo schulteGrid = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.schulteGrid,
    name: '舒尔特方格',
    avatar: IconFontValue.schulteGrid,
    routerKey: RouterKey.schulteGrid);

const AppInfo countDuck = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.countDucks,
    name: '数鸭子',
    avatar: IconFontValue.duck,
    routerKey: RouterKey.countDucks,
    backgroundColor: 0xfffee6b8);

const AppInfo arithmetic = AppInfo(
    kind: AppKind.learnApp,
    id: AppId.arithmetic,
    name: '算术',
    avatar: IconFontValue.arithmetic,
    routerKey: RouterKey.arithmetic);

const AppInfo setting = AppInfo(
    kind: AppKind.system,
    id: AppId.setting,
    name: '设置',
    avatar: IconFontValue.setting,
    routerKey: RouterKey.setting);

const AppInfo fileShare = AppInfo(
    kind: AppKind.system,
    id: AppId.smbBrowser,
    name: '文件共享',
    avatar: IconFontValue.fileShare,
    routerKey: RouterKey.smbBrowser);

const List<AppInfo> miniAppList = [
  pictorial,
  someThing,
  number,
  color,
  shape,
  practice,
  pinYin,
  countDuck,
  // arithmetic,
  // fileShare,
  // schulteGrid,
  // setting,
];

final AppInfo someThingPractice = AppInfo(
    kind: someThing.kind,
    id: someThing.id,
    name: someThing.name,
    avatar: someThing.avatar,
    routerKey: RouterKey.someThingPractice,
    backgroundColor: someThing.backgroundColor);

final AppInfo numberPractice = AppInfo(
    kind: number.kind,
    id: number.id,
    name: number.name,
    avatar: number.avatar,
    routerKey: RouterKey.numberPractice,
    backgroundColor: number.backgroundColor);

final AppInfo colorPractice = AppInfo(
    kind: color.kind,
    id: color.id,
    name: color.name,
    avatar: color.avatar,
    routerKey: RouterKey.colorPractice,
    backgroundColor: color.backgroundColor);

final AppInfo shapePractice = AppInfo(
    kind: shape.kind,
    id: shape.id,
    name: shape.name,
    avatar: shape.avatar,
    routerKey: RouterKey.shapePractice,
    backgroundColor: shape.backgroundColor);

final List<AppInfo> practiceAppList = [
  someThingPractice,
  numberPractice,
  colorPractice,
  shapePractice,
];
